package com.sheng.whyclass.work.model;

import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.google.gson.annotations.SerializedName;
import com.sheng.whyclass.person.model.BaseResult;

import java.util.List;

/**
 * Created by Administrator on 2016/4/4.
 */
public class OneStudentData extends BaseResult{


    /**
     * static : 1
     * data : [{"id":"16","topic":"第一章","content":"1.一个学校有多 个分院 ，每个分院有各自的 网站 ，如果提供一台 WEB 服务器，如何设 置？ 2.在访问一些网 站时， 为什么只需要输入域 名就 能访问网站主页？","issue_time":"2016-03-28 21:45:53","s_id":"1","w_c_id":"15","answer_content":"diyizhang","is_finished":"1","is_checked":"0","name":"xiaoming","pass":"123456","class":"1","department":"ceshi","score":"99"},{"id":"21","topic":"第二章","content":"1.文件系统、本 地 IIS 、 FTP 站点和远程站点的 区别是什么？ 2.说明什么是虚 拟主机 ， Internet 上提的虚拟主 机是如何运行的？","issue_time":"2016-03-28 21:46:20","s_id":"1","w_c_id":"16","answer_content":"22223","is_finished":"1","is_checked":"0","name":"xiaoming","pass":"123456","class":"1","department":"ceshi","score":"99"},{"id":"28","topic":"第五章","content":"1.说明修饰符 public 、 internal 、 protected 、 protected internal 、 private 的区别？ ","issue_time":"2016-03-28 21:48:35","s_id":"1","w_c_id":"19","answer_content":"55555","is_finished":"1","is_checked":"0","name":"xiaoming","pass":"123456","class":"1","department":"ceshi","score":"95"},{"id":"32","topic":"第一章","content":"1.一个学校有多 个分院 ，每个分院有各自的 网站 ，如果提供一台 WEB 服务器，如何设 置？ 2.在访问一些网 站时， 为什么只需要输入域 名就 能访问网站主页？","issue_time":"2016-03-28 21:45:53","s_id":"1","w_c_id":"15","answer_content":"diyizhang","is_finished":"1","is_checked":"0","name":"xiaoming","pass":"123456","class":"1","department":"ceshi","score":"100"},{"id":"33","topic":"第二章","content":"1.文件系统、本 地 IIS 、 FTP 站点和远程站点的 区别是什么？ 2.说明什么是虚 拟主机 ， Internet 上提的虚拟主 机是如何运行的？","issue_time":"2016-03-28 21:46:20","s_id":"1","w_c_id":"16","answer_content":"22223","is_finished":"1","is_checked":"0","name":"xiaoming","pass":"123456","class":"1","department":"ceshi","score":"100"},{"id":"36","topic":"第一章","content":"1.一个学校有多 个分院 ，每个分院有各自的 网站 ，如果提供一台 WEB 服务器，如何设 置？ 2.在访问一些网 站时， 为什么只需要输入域 名就 能访问网站主页？","issue_time":"2016-03-28 21:45:53","s_id":"1","w_c_id":"15","answer_content":"diyizhang","is_finished":"1","is_checked":"0","name":"xiaoming","pass":"123456","class":"1","department":"ceshi","score":"66"}]
     */

    @SerializedName("static")
    private int staticX;
    /**
     * id : 16
     * topic : 第一章
     * content : 1.一个学校有多 个分院 ，每个分院有各自的 网站 ，如果提供一台 WEB 服务器，如何设 置？ 2.在访问一些网 站时， 为什么只需要输入域 名就 能访问网站主页？
     * issue_time : 2016-03-28 21:45:53
     * s_id : 1
     * w_c_id : 15
     * answer_content : diyizhang
     * is_finished : 1
     * is_checked : 0
     * name : xiaoming
     * pass : 123456
     * class : 1
     * department : ceshi
     * score : 99
     */

    private List<DataBean> data;

    public static OneStudentData getFromJson(String json) {
        if (json == null) {
            return null;
        }
        Gson gson = new Gson();
        OneStudentData info = null;
        try {
            info = gson.fromJson(json, OneStudentData.class);
        } catch (JsonSyntaxException jsonSyntaxException) {
        }
        return info;
    }

    public int getStaticX() {
        return staticX;
    }

    public void setStaticX(int staticX) {
        this.staticX = staticX;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }


    public static class DataBean {
        private String id;
        private String topic;
        private String content;
        private String issue_time;
        private String s_id;
        private String w_c_id;
        private String answer_content;
        private String is_finished;
        private String is_checked;
        private String name;
        private String pass;
        @SerializedName("class")
        private String classX;
        private String department;
        private String score;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getTopic() {
            return topic;
        }

        public void setTopic(String topic) {
            this.topic = topic;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getIssue_time() {
            return issue_time;
        }

        public void setIssue_time(String issue_time) {
            this.issue_time = issue_time;
        }

        public String getS_id() {
            return s_id;
        }

        public void setS_id(String s_id) {
            this.s_id = s_id;
        }

        public String getW_c_id() {
            return w_c_id;
        }

        public void setW_c_id(String w_c_id) {
            this.w_c_id = w_c_id;
        }

        public String getAnswer_content() {
            return answer_content;
        }

        public void setAnswer_content(String answer_content) {
            this.answer_content = answer_content;
        }

        public String getIs_finished() {
            return is_finished;
        }

        public void setIs_finished(String is_finished) {
            this.is_finished = is_finished;
        }

        public String getIs_checked() {
            return is_checked;
        }

        public void setIs_checked(String is_checked) {
            this.is_checked = is_checked;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getPass() {
            return pass;
        }

        public void setPass(String pass) {
            this.pass = pass;
        }

        public String getClassX() {
            return classX;
        }

        public void setClassX(String classX) {
            this.classX = classX;
        }

        public String getDepartment() {
            return department;
        }

        public void setDepartment(String department) {
            this.department = department;
        }

        public String getScore() {
            return score;
        }

        public void setScore(String score) {
            this.score = score;
        }
    }
}
